package com.ruoyi.business.service.impl;

import com.ruoyi.business.domain.TFileInfo;
import com.ruoyi.business.mapper.TFileInfoMapper;
import com.ruoyi.business.service.FileInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 文件处理类
 * @author 洋葱骑士
 *
 */
@Service
public class FileInfoServiceImpl implements FileInfoService {

	@Resource
	TFileInfoMapper tFileInfoMapper;

    @Override
    public int addFileInfo(TFileInfo fileInfo) {
        return tFileInfoMapper.insertSelective(fileInfo);
    }

    @Override
    public List<TFileInfo> selectFileByParams(TFileInfo fileInfo) {
        return tFileInfoMapper.selectFileByParams(fileInfo);
    }

//    @Override
//	public List<TFileInfo> selectFileList(QueryInfo  query) {
//		return tFileInfoMapper.selectFileList(query);
//	}

	@Override
	public int deleteFile(TFileInfo tFileInfo) {
		TFileInfo t = new TFileInfo();
		t.setId(tFileInfo.getId());
		t.setDelFlag("1");
		return tFileInfoMapper.updateByPrimaryKeySelective(t);
	}
}
